/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package mail.client.pkg1142076;

import java.util.logging.Level;
import java.util.logging.Logger;
import javax.mail.Message;
import javax.mail.MessagingException;

/**
 *
 * @author Quân
 */
public class MyMessage {

    private Message message;

    public MyMessage(Message message) {
        this.message = message;
    }

    public Message getMessage() {
        return message;
    }

    public void setMessage(Message message) {
        this.message = message;
    }

    @Override
    public String toString() {
        try {
            return message.getSubject();
        } catch (MessagingException ex) {
            Logger.getLogger(MyMessage.class.getName()).log(Level.SEVERE, null, ex);
        }
        return null;
    }
}
